package com.xiaoshuidi.cloud.module.finance.controller.admin.invoice.vo;

import com.xiaoshuidi.cloud.module.finance.enums.invoice.InvoicingStatusEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.Map;

@Data
public class FinanceInvoiceRecordVO {
    private Long id;
    /** 客户id **/
    @Schema(description="客户id")
    private Long custId;
    /** 客户类型 **/
    @Schema(description="客户类型")
    private String custType;
    /** 关联业务id **/
    @Schema(description="关联业务id")
    private String sourceBizId;
    /** 关联业务类型 **/
    @Schema(description="关联业务类型")
    private String sourceBizType;
    private Map<String, Object> extra;
    private Long apartmentId;
    /** 门店名称 **/
    @Schema(description="门店名称")
    private String apartmentName;
    private String roomName;
    /** 发票类型 **/
    @Schema(description="发票类型")
    private String invoiceType;
    /** 抬头(企业/个人) **/
    @Schema(description="抬头(企业/个人)")
    private String titleType;
    /** 发票抬头 **/
    @Schema(description="发票抬头")
    private String title;
    /** 开票金额 **/
    @Schema(description="开票金额")
    private java.math.BigDecimal amount;
    /** 开票主体企业名称 **/
    @Schema(description="开票主体企业名称")
    private String invoicingCompany;
    private Integer invoiceConfigId;
    /** 开票审核人 **/
    @Schema(description="开票审核人")
    private String reviewer;
    /** 订单号 **/
    @Schema(description="订单号")
    private String orderNo;
    /** 请求流水号 **/
    @Schema(description="请求流水号")
    private String seqNo;
    /** 税控设备编号 **/
    @Schema(description="税控设备编号")
    private String taxDeviceNo;
    /** 发票代码 **/
    @Schema(description="发票代码")
    private String invoiceCode;
    /** 发票号码 **/
    @Schema(description="发票号码")
    private String invoiceNo;
    /** 开票日期 **/
    @Schema(description="开票日期")
    private LocalDateTime createDate;
    /** 合计不含税金额 **/
    @Schema(description="合计不含税金额")
    private java.math.BigDecimal amountWithoutTax;
    /** 合计税额 **/
    @Schema(description="合计税额")
    private java.math.BigDecimal taxAmount;
    /** 校验码 **/
    @Schema(description="校验码")
    private String checkCode;
    /** 二维码 **/
    @Schema(description="二维码")
    private String qrCode;
    /** pdf下载路径 **/
    @Schema(description="pdf下载路径")
    private String pdfUrl;
    /** 红票 **/
    @Schema(description="红票")
    private String reversalPdfUrl;
    /** 接收邮箱 **/
    @Schema(description="接收邮箱")
    private String email;
    /** 接收手机号 **/
    @Schema(description="接收手机号")
    private String mobile;
    private String remark;
    private Long tenantId;
    @Schema(description = "PENDING(\"待审核\"),\n" +
            "WAITING(\"开票中\"),\n" +
            "SUCCESS(\"已开票\"),\n" +
            "FAILURE(\"开票失败\");")
    private String status;
    /** 红冲状态 **/
    @Schema(description="红冲状态, PENDING(\"待审核\"),\n" +
            "WAITING(\"待红冲\"),\n" +
            "SUCCESS(\"已红冲\"),\n" +
            "FAILURE(\"红冲失败\")")
    private String reversalStatus;
    private LocalDateTime createTime;
    private LocalDateTime updateTime;

    public String getStatusDesc() {
        return InvoicingStatusEnum.getDesc(this.status);
    }

    public String getReversalStatusDesc() {
        return InvoicingStatusEnum.getReversalDesc(this.reversalStatus);
    }
}
